# SPDX-License-Identifier: GPL-2.0-only
#
# Makefile for Hisilicon processors family
#

CFLAGS_platmcpm.o	:= -march=armv7-a
ifdef CONFIG_ARCH_RTOS_HISI
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
endif

obj-y	+= hisilicon.o
obj-$(CONFIG_MCPM)		+= platmcpm.o
obj-$(CONFIG_SMP)		+= platsmp.o hotplug.o

ifdef CONFIG_ARCH_RTOS_HISI
obj-$(CONFIG_ARCH_SD5203)	+= sd5203.o
obj-$(CONFIG_SMP)		+= platsmp_rtos.o core_reset.o core_reset_handle.o headsmp.o reset_start.o
obj-$(CONFIG_HISI_L2_OUTER_CACHE)	+= cache.o
obj-$(CONFIG_HISI_L3_OUTER_CACHE)	+= l3_cache.o
obj-$(CONFIG_RTOS_CPU_MODE)		+= rtos_cpu_mode.o
obj-$(CONFIG_RTOS_HAL_CHIP_HI5651T_SUPPORT)	+= hi5651t.o
endif

ifeq ($(CONFIG_PCIE_ONT), y)
pcie-y	+= pcie_chip.o pcie_reset.o pcie_core.o pcie_msi.o pcie_board_attr.o
obj-m	+= pcie.o
endif

obj-$(CONFIG_DRV_ONT) += hw_drv_core.o hi_drv_wdt.o
